<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <title>List of Instructors</title>
        <link rel="stylesheet" type="text/css" href="css/style.css" />
        <link rel="stylesheet" type="text/css" href="css/menu.css" />
        <link rel="stylesheet" type="text/css" href="themes/table/blue/style.css" />
        <script type="text/javascript" src="js/jquery.js"></script>
        <script type="text/javascript" src="js/menu.js"></script>

        <script type="text/javascript">
            function redirectMe (sel) {
                var url = sel[sel.selectedIndex].value;
                window.location = url;
            }
            function addRowToTable()
            {
                var xmlhttp;
                if (window.XMLHttpRequest)
                {// code for IE7+, Firefox, Chrome, Opera, Safari
                    xmlhttp=new XMLHttpRequest();
                }
                else
                {// code for IE6, IE5
                    xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
                }
                xmlhttp.onreadystatechange=function()
                {
                    if (xmlhttp.readyState==4 && xmlhttp.status==200) {
                        document.getElementById("planeform").innerHTML=xmlhttp.responseText;
                        updateRow();
                    }
                }
                xmlhttp.open("get","jsp/newairplaneform.jsp",true);
                xmlhttp.send();
            }
            function updateRow(){
                var planeButton = document.getElementById('addPlane');
                var planes = document.getElementById('planeList');
                planes.removeChild(planeButton);

            }
            function deletePlane() {
                var r = confirm("Delete ${plane.tailNumber}?");
                if (r==true) {
                    window.location="UpdateMe";
                    alert("Airplane Deleted");
                }
            }
        </script>

    </head>
    <body>
        <div id="main_container">

            <div class="header">
                <div class="logo"><a href="Home"><img src="images/logo.jpg"/></a></div>

                <div class="right_header">Login</div>

            </div> <!-- end header -->

            <div class="main_content">
                <jsp:include page="${sessionScope.menuChoice}" />
                <div class="center_content">
                    <div class="left_content">
                    </div> <!-- end left content -->
                    <div class="right_content">
                        <form method="post" id="planeform" action="DateTimeChecker">
                            <table id="myTable" class="tablesorter" border="0" cellpadding="0" cellspacing="1">
                                <tr><h2>${alert}</h2></tr>
                                <thead>
                                    <tr style="font-weight: bold">
                                        Choose a time, date, and rental length:
                                    </tr>
                                </thead>
                                <tbody
                                    <tr>
                                        <td align="center"><input type="text" name="time"/></td>
                                        <td><input type="text" name="date"/></td>
                                    </tr>
                                    <tr>
                                        <td><select name ="rentalTime">
                                                <option value="Hourly">Hourly</option>
                                                <option value="Daily">Daily</option>
                                                <option value="Weekly">Weekly</option>
                                                <option value="Weekend">Weekend</option>
                                                <option value="Monthly">Monthly</option>
                                            </select>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td><input type="button" value="Submit"/></td>
                                    </tr>
                                </tbody>
                            </table>
                        </form>
                    </div>
                    <br></br><br></br>
                </div>
                <div class="clear"></div>
            </div> <!--end of main content-->
            <div class="footer">
                <div class="left_footer"><a href="http://apycom.com/"></a>Red Team &copy;</div>
                <div class="right_footer"></div>
            </div> <!-- end footer -->

        </div> <!-- end main container -->
    </body>
</html>